package com.sinaapp.mspring.model.vo;

/**
 * 分页器vo
 * @author binchao
 * 2016年3月1日
 */
public class PageParameter {

	private Integer currentPage = 1; //当前页
	private Integer pageSize = 10;  //分页大小
	private Integer totalPage; //总页数
	private Integer totalRecord; //总记录数
	private Integer begin; //用于SQL的开始条目
	private Object obj; //查询条件
	
	public Integer getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}
	
	public Integer getPageSize() {
		return pageSize;
	}
	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public Integer getTotalPage() {
		return totalRecord / pageSize +1;
	}
	public void setTotalPage(Integer totalPage) {
		this.totalPage = totalPage;
	}
	public Integer getTotalRecord() {
		return totalRecord;
	}
	public void setTotalRecord(Integer totalRecord) {
		this.totalRecord = totalRecord;
	}
	public Object getObj() {
		return obj;
	}
	public void setObj(Object obj) {
		this.obj = obj;
	}
	
	public Integer getBegin() {
		return (currentPage-1)*pageSize;
	}
	public void setBegin(Integer begin) {
		this.begin = begin;
	}
	
}
